package com.zcoj.pojo.Vo;

import com.zcoj.pojo.Dto.Contest;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author chenbin
 * @version 1.0
 * @description: TODO
 * @date 2023/4/10 09:55
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ContestMainPageVO {
    private Integer id;

    private String avatar;

    private String author;

    private String title;

    private Integer type;

    private Integer auth;

    private Date startTime;

    private Date endTime;

    private Integer isRegister;//0 未注册 1注册可以使用 2封禁


    public void setContest(Contest contest){
        this.id=contest.getId();
        this.auth=contest.getAuth();
        this.author=contest.getAuthor();
        this.avatar=contest.getAvatar();
        this.startTime=contest.getStartTime();
        this.endTime=contest.getEndTime();
        this.title=contest.getTitle();
        this.type=contest.getType();
    }


}
